package com.sunyur.tailor.channel.web.outer.inventory.dto;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @ClassName SunyurInventoryReleaseParam
 * @Description 物料库存台账批量加(减)库存请求参数
 * @Author xuhui
 * @Date 2021/6/21 22:46
 * @Version 1.0
 */
@Data
public class InventoryReleaseOrReduceDTO {
    /**
     * 请求key,保证唯一性(用来做接口幂等)
     */
    @NotBlank(message = "请求key不能为空")
    private String requestKey;
    /**
     * 操作人编码
     */
    @NotBlank(message = "操作人编码不能为空")
    private String operatorCode;
    /**
     * 库存流水，最大为100条
     */
    @Valid
    @Size(max = 100,message = "集合长度不能超过100")
    private List<RecordParamList> recordParamList;

    public InventoryReleaseOrReduceDTO(String requestKey, String operatorCode) {
        this.requestKey = requestKey;
        this.operatorCode = operatorCode;
    }
}
